﻿using System;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SD.IBUS;
using SD.Entities;
using SD.DAL;
using SD.IDAL;

namespace SD.BUS
{
    public class CountryBIZ : BaseBIZ, ICountryBIZ
    {
        #region ICountryBIZ Members

        /// <summary>
        /// Get all contact add into list contact
        /// </summary>
        /// <returns>list contact</returns>
        public List<SD.Entities.Country> GetAll()
        {
            List<Country> lstResut = new List<Country>();
            try
            {
                ICountryDAO countryDAO = new CountryDAO();
                lstResut = countryDAO.GetAll();
            }
            catch (SqlException ex)
            {
                throw ex;
            }

            return lstResut;
        }

        /// <summary>
        /// Get an appropriate country
        /// </summary>
        /// <param name="countryId"></param>
        /// <returns></returns>
        public SD.Entities.Country GetById(string countryId)
        {
            Country result = null;
            try
            {
                ICountryDAO countryDAO = new CountryDAO();
                result = countryDAO.GetById(countryId);
            }
            catch (SqlException ex)
            {
                throw ex;
            }

            return result;
        }

        /// <summary>
        /// Process exception for event insert 
        /// </summary>
        /// <param name="country"></param>
        /// <returns>NotImplementedException</returns>
        public bool Insert(SD.Entities.Country country)
        {
            return false;
        }

        /// <summary>
        /// Process exception for event update 
        /// </summary>
        /// <param name="country"></param>
        /// <returns>NotImplementedException</returns>
        public bool Update(SD.Entities.Country country)
        {
            return false;
        }

        /// <summary>
        /// Process exception for event delete
        /// </summary>
        /// <param name="countryId"></param>
        /// <returns>NotImplementedException</returns>
        public bool Delete(string countryId)
        {
            return false;
        }

        #endregion
    }
}
